﻿@model S4Store.Models.Decorate.DecorateSaleDetailModel
 @{
     Layout = null;
     ViewBag.Title = "DecorateSaleDetail";
}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)

 <table  style="border-collapse:collapse; width:100%" class="reporttable vmiddle">
 
 <tr>
  <th rowspan="2">车型</th>
  <th rowspan="2">车款</th>
  <th rowspan="2">本月累计交车</th>
  <th colspan="2">装潢车</th>
  <th rowspan="2">装潢车销售率</th>
  <th rowspan="2">平均单车装潢总额(万元)</th>
 </tr>
 <tr>
  <th>已售台次</th>
  <th>装潢总额</th>
 </tr>
   @for (var i = 0; i < Model.Reports.Count; i++)
   {
       var report = Model.Reports[i];
 <tr>
    @if (i == 0)
    {
   <td rowspan="@Model.Reports.Count">@Model.CarBrand.Name</td>
    }
    <td>@report.CarModel.Name</td> 
    <td>@report.GiveCarCount</td>  
    <td>@report.DecorateCount</td> 
    <td>@report.DecorateAmout.toInt()</td> 
    <td @S4Store.Utils.GetBgColor(report.DecorateXSLV >= report.CarKpiMonthConfig.DecorateSaleRateTagrt)>@report.DecorateXSLV.toInt()%</td> 
    <td  @S4Store.Utils.GetBgColor(report.DecorateAmoutOfSingCar >= report.CarKpiMonthConfig.DecorateAvgTagrt)>@report.DecorateAmoutOfSingCar.toInt(3)</td> 
 </tr>
     
   }
   <tr>
    <td colspan="2">@(Model.CarBrand.Name)合计</td>
    <td>@Model.CarBrandReport.GiveCarCount</td>
    <td>@Model.CarBrandReport.DecorateCount</td>   
    <td>@Model.CarBrandReport.DecorateAmout</td>   
    <td @S4Store.Utils.GetBgColor(Model.CarBrandReport.DecorateXSLV>=Model.CarBrandReport.CarKpiMonthConfig.DecorateSaleRateTagrt)>@Model.CarBrandReport.DecorateXSLV.toInt()%</td>   
    <td @S4Store.Utils.GetBgColor(Model.CarBrandReport.DecorateAvgTagrt >= Model.CarBrandReport.CarKpiMonthConfig.DecorateAvgTagrt)>@Model.CarBrandReport.DecorateAvgTagrt.toInt(2)</td>
   </tr>
 </table>

 
</div>